package com.wind.taobao.api.trade.trade.rest
{
	import com.wind.taobao.api.IPrivateAPI;
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	/**
	 * taobao.refunds.apply.get Request
	 * @author fxy
	 *
	 */
	public class RefundsApplyGetRequest extends TaobaoRequest implements IPrivateAPI
	{
		public override function get method():String
		{
			return "taobao.refunds.apply.get"
		}
		/**
		 * Y 	 需要返回的字段。目前支持有：refund_id、tid、title、buyer_nick、seller_nick、total_fee、status、created、refund_fee
		 */
		[Bindable]
		public var fields:String="refund_id,tid,title,buyer_nick,seller_nick,total_fee,status,created,refund_fee";
		/**
		 * N 	退款状态。可选值:<br>
		 * WAIT_SELLER_AGREE(买家已经申请退款，等待卖家同意),<br>
		 * WAIT_BUYER_RETURN_GOODS(卖家已经同意退款，等待买家退货),<br>
		 * WAIT_SELLER_CONFIRM_GOODS(买家已经退货，等待卖家确认收货),<br>
		 * CLOSED(退款关闭),<br>
		 * SUCCESS(退款成功),<br>
		 * SELLER_REFUSE_BUYER(卖家拒绝退款)
		 */
		[Bindable]
		public var status:String;
		/**
		 * N 	卖家昵称
		 */
		[Bindable]
		public var seller_nick:String;
		/**
		 *	N 退款类型。可选值:<br>
		 * guarantee_trade(一口价、拍卖),<br>
		 * auto_delivery(自动发货),<br>
		 * independent_shop_trade(外部网店),<br>
		 * ec(直冲),<br>
		 * cod(货到付款)<br>
		 * 默认同时查询guarantee_tradea、auto_delivery的2种类型的数据
		 */
		[Bindable]
		public var type:String;
		/**
		 * N 	页码。传入值为 1 代表第一页，传入值为 2 代表第二页，依此类推。默认返回的数据是从第一页开始
		 */
		[Bindable]
		public var page_no:int;
		/**
		 * N 	每页条数。取值范围:大于零的整数; 默认值:40;最大值:100
		 */
		[Bindable]
		public var page_size:int;

		public override function validate():void
		{
			if (!TaobaoUtils.hasValue(fields))
			{
				throw new InvalidRequestParametersException("请求参数[fields]不能为空");
			}
		}
	}
}